package com.candy.control;

import com.candy.service.UserInfoService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/deleteUserInfoByAjax")
public class DeleteUserInfoAjaxServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        获取前端传递进来的id
        //        接收前端传递进来的参数
        int userId=Integer.parseInt(req.getParameter("id"));
//        调用业务逻辑处理层
        UserInfoService service=new UserInfoService();
        service.deleteUserInfo(userId);
    }
}
